﻿using System;

namespace 装饰模式
{
    class Program
    {
        static void Main(string[] args)
        {
            Phone hw = new HuaWeiPhone();

            Decorator decorator1 = new Sticker(hw);
            decorator1.Print();

            Console.WriteLine("----------------------\n");

            Decorator decorator2 = new Accessories(hw);
            decorator2.Print();

            Console.WriteLine("----------------------\n");

            //同时执行贴膜和增加挂件
            Sticker sticker = new Sticker(hw);
            Accessories accessories = new Accessories(sticker);
            accessories.Print();
        }
    }
}
